import java.util.Iterator;
import java.util.Spliterator;
import java.util.function.Consumer;

/**
 * Created by asus on 2017/10/22.
 */
public class CLArrayBinaryTree<T> implements BinaryTree<T> {
    private final int DEFAULT_CAPACTY = 15;
    private T[] myArray = (T[])(new Object[DEFAULT_CAPACTY]);
    int index = 0;
    int heigh = 0;
    CLArrayBinaryTree<T> right = new CLArrayBinaryTree<>();
    CLArrayBinaryTree<T> left = new CLArrayBinaryTree<>();

    public CLArrayBinaryTree(){
        myArray[0]=null;
    }

    public CLArrayBinaryTree(T element){
        myArray[0]=element;
    }

    @Override
    public void forEach(Consumer<? super T> action) {

    }

    @Override
    public Spliterator<T> spliterator() {
        return null;
    }

    @Override
    public Iterator<T> iterator() {
        return null;
    }

    @Override
    public T getRootElement() {
        return myArray[0];
    }

    public CLArrayBinaryTree<T> getLeft(){
        return null;
    }


    @Override
    public BinaryTree<T> getRight() {
     return null;
    }

    @Override
    public boolean contains(T target) {
        return false;
    }

    @Override
    public T find(T target) {
        return null;
    }

    @Override
    public boolean isEmpty() {
        return false;
    }

    @Override
    public int size() {
        return 0;
    }

    @Override
    public Iterator<T> preorder() {
        return null;
    }

    @Override
    public Iterator<T> inorder() {
        return null;
    }

    @Override
    public Iterator<T> postorder() {
        return null;
    }

    @Override
    public Iterator<T> levelorder() {
        return null;
    }
    public void add(T element){
        myArray[index]=element;
        index++;

    }
}
